import { twoRoutere, constantRoutes } from '@/router/index'
const mutations = {
  setrouter(store, routes) {
    state.arr = [...constantRoutes, ...routes]
  }
}
const actions = {
  fn(store, data) {
    console.log(data)
    console.log(twoRoutere)
    const routes = twoRoutere.filter(v => data.includes(v.name))
    store.commit('setrouter', routes)
    console.log(routes)
    return routes
  }
}
const state = {
  arr: []
}

export default {
  namespaced: true,
  mutations,
  actions,
  state
}
